/*
* Conditions Of Use
*
* This software was developed by employees of the Sigmatrix(Beijing) Corporation.
* This software is provided by sigmatrix as a service and is expressly
* provided "AS IS."  Sigmatrix MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT
* AND DATA ACCURACY.  Sigmatrix does not warrant or make any representations
* regarding the use of the software or the results thereof, including but
* not limited to the correctness, accuracy, reliability or usefulness of
* the software.
*
* Permission to use this software is contingent upon your acceptance
* of the terms of this agreement.
*
*/
package com.sigmatrix.h5.service;

import java.util.List;

import com.sigmatrix.h5.entity.DisDealer;
import com.sigmatrix.h5.entity.DisRebateActivity;
import com.sigmatrix.h5.entity.DisRebateAudit;
import com.sigmatrix.h5.web.mode.RebateRecord.Rebate;
import com.sigmatrix.h5.web.mode.RebateTotal;
import com.sigmatrix.sc.jdbc.common.service.Service;

/**
 *@ClassName: DisRebateAuditService
 *@Description: 
 *@author MH
 *@date 2017年8月16日 下午2:03:12
 */
public interface DisRebateAuditService extends Service<DisRebateAudit,Integer>{
	
	/**
	 * 
	 *@param qrCode 
	 * @Title: apply
	 *@Description: 发起返利流程
	 *@return void
	 *@author MH
	 *@date 2017年12月6日 下午4:39:07
	 *@param activity
	 *@param dealers
	 */
	List<Rebate> apply(DisRebateActivity activity,Short writeBackDealerLevel,Short promotionCodeType,DisDealer ... dealers);
	/**
	 * 返利
	 * 
	 *@return List<Rebate>
	 *@author wjwei
	 *@date 2018年3月16日 下午4:37:30
	 *@param activity 返利所用的活动
	 *@param source
	 *@param writeBackDealerLevel
	 *@param promotionCode
	 *@param promotionCodeType
	 *@param isNeedOut  返利是否需要判断，上级经销商是否正常出库
	 *@param dealers
	 *@return
	 */
	List<Rebate> apply(DisRebateActivity activity,String source,Short writeBackDealerLevel,String promotionCode,Short promotionCodeType,DisDealer ... dealers);
	/**
	 * 
	 *@Title: statisticByDealerAndActivity
	 *@Description:查询返利的总金额及总记录数
	 *@return DisRebateAuditRecord
	 *@author MH
	 *@date 2018年1月25日 下午1:55:00
	 *@param dealerId
	 *@param rebateTarget
	 *@param activityId
	 *@return
	 */
	RebateTotal statisticByDealerAndActivity(Integer dealerId,Short dealerType,Integer activityId);
}
